package com.wkbb.sports.mapper;

import com.wkbb.common.base.BaseMapper;
import com.wkbb.sports.dto.ExcelDto3;
import com.wkbb.sports.dto.WorkStuDto;
import com.wkbb.sports.dto.WorkStudentHistoryDto;
import com.wkbb.sports.model.HlifeWorkStudent;
import com.wkbb.sports.model.HlifeWorkStudentHistory;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author lbh
 * @date 2021年03月29日 17:58:34
 * @description:
 */
@Repository
public interface HlifeWorkStudentHistoryMapper extends BaseMapper<HlifeWorkStudentHistory> {

    /**
     * 查询学生本次作业提交历史中的最优成绩【只算已达标的】
     * @param workStudentId
     * @return
     */
    public HlifeWorkStudentHistory getHlifeWorkStudentHistoryOptimal(Long workStudentId);
    /**
     * 查询学生本次作业提交历史中的最优成绩【最好的成绩都未达标】
     * @param workStudentId
     * @return
     */
    public HlifeWorkStudentHistory getHlifeWorkStudentHistoryOptimal1(Long workStudentId);

    void deleteByPrimaryKeyBatch(@Param("ids")String ids);

    public List<WorkStudentHistoryDto> getListByWorkStudentId(@Param("workStudentId")Long workStudentId);

    //获取某个作业已达标/未达标的学生列表
    public List<WorkStuDto> getUnAndReachStudentList(@Param("workId")String workId, @Param("reached") Integer reached);

    //===========================================PC端作业模块=============【begin】===============================================================

    //public List<WorkStudentHistoryDto> getListByWorkStudentIdForPc(@Param("workStudentId")Integer workStudentId,@Param("orgId")Integer orgId);
    public List<Map<String,Object>> getListByWorkStudentIdForPc(@Param("workStudentId")Long workStudentId,@Param("orgId")Long orgId);

    public List<ExcelDto3> getListByWorkStudentIdForPc1(@Param("studentId")Long studentId, @Param("orgId")Long orgId, @Param("achivement")String achivement, @Param("minAchivement")String minAchivement, @Param("maxAchivement")String maxAchivement, @Param("teacherName")String teacherName);

    Integer getTodayTotalAchivement(Map<String, Object> map1);

    List<WorkStuDto> getWorkStudentByDate(@Param("workId")String workId, @Param("date")String date);

//===========================================PC端作业模块=============【end】===============================================================


}